const Koa = require('koa')
const koaBody = require('koa-body')

const userRouter = require('../router/user.route')

const app = new Koa()
// body解析中间件需在最前加载
app.use(koaBody())
// 新建中间件
// ctx 所有http上下文
app.use(userRouter.routes())

module.exports = app